<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.ort">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script th:src="@{/layui/layui.js}" type="text/javascript"></script>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet" />
    <style>
        .layui-upload-img{
            border: 1px solid #1E9FFF;
            max-width: 150px;
            max-height: 56px;
            /*border-radius: 200px;*/
        }

    </style>
</head>

<body>
<div class="layui-panel" style="padding: 8px;">
    <fieldset class="layui-elem-field layui-border-blue">
        <legend>搜索信息</legend>
        <form class="layui-form" style="margin: 15px;">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">用户Id</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" type="text"  name="uid" autocomplete="off" />
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label" style="padding-left:1px ;">商品id</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" type="text" name="pid" autocomplete="off" />
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <a class="layui-btn layui-btn-primary" lay-submit="" lay-filter="searchBtn">
                            <i class="layui-icon layui-icon-search"></i>
                            搜索
                        </a>
                    </div>
                </div>
            </div>
        </form>
    </fieldset>
    <div>
        <table id="memberTable"lay-filter="memberTable"></table>
    </div>
</div>


<script>
    var $;
    layui.use(['table','form','layer','jquery'],function(){
        var table=layui.table,form=layui.form,layer=layui.layer;
        $=layui.jquery;

        //加载表格
        table.render({
            elem:'#memberTable',
            height:'full-160',
            url:'/goods/mcc/find',
            page:true,
            cols:[
                [
                    {field:'id',align:'center',title:'收藏Id'},
                    {field:'userId',title:'用户Id',align:'center'},
                    {field:'pid',align:'center',title:'商品Id'},
                    {field:'addTime',align:'center',title:'添加时间'},

                ]
            ]
        })


        form.on('submit(searchBtn)',function(data){
            var dataForm=data.field;
            table.reload('memberTable',{
                url:'/goods/mcc/seachFind',
                page:{
                    curr:1
                },
                where:{
                    userId:dataForm.uid,
                    pId:dataForm.pid,

                }
            })
        })
    })
</script>
</body>
</html>
